Ulcerative colitis (UC) is an inflammatory bowel disease (IBD) of parts of or the entire colon and rectum. UC often starts in young adulthood and affects patients throughout their whole lives. The cause of UC is currently unknown. Clinical symptoms and biological markers of inflammation assessment is used for diagnosing UC. The assessment usually include measuring intestinal permeability. Accordingy, in inflamed intestine tissues, the permeability is increased due to the loss of epithelial cells and/or the disruption of tight junctions between epithelial cells. The measurement of electrical impedance is recently demonstrated to be capable of monitoring mucosal integrity and inflammation disruption in real time.
In the research conducted in the chosen paper, the researchers aimed to use an established experimental model of 2,4,6-trinitrobenzene sulphonic acid (TNBS)-induced colitis in rats to assess whether changes in impedance can be spatially restricted to the site of inflammation, thus able to predict severities of intestinal inflammation. Impedance measurements were taken from normal rats at 5.5 and 8 cm into the colon, from the anal margin. Among the rats receiving the TNBS injection, a baseline internal control impedance measurement was taken, also at 5.5 and 8 cm into the colon at 5 min prior to injection and 90 min following the TNBS injection. Penumbra here refers to the adjacent region, which is 5.5 cm into the colon, and epicentre refers to the lesion region, which is 8 cm into the colon. At the same position in the colon, a sample of colonic tissue was taken from both normal rats and in rats 90 min after they receive the TNBS injections.
Load the packages first.
> library(curl)
## Using libcurl 7.84.0 with Schannel
> library(tidyr)
> library(ggplot2)
> library(dplyr)
##
## 载入程辑包:'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
> library(ggpubr)
> library(AICcmodavg)
> library(broom)
Assign the data to variables.
> f <- curl("https://raw.githubusercontent.com/cbao2397/DataStorage/main/ProcessedEverything.csv")
> d <- read.csv(f, header=TRUE, sep=",", stringsAsFactors=FALSE)
> d[is.na(d)] <- 0
> head(d) #showing a few lines of raw data
## TissueID TissueType Severity_LI Extent_LI GCL ECL EMD TotalScore ImpedanceB
## 1 1 5.5 1 1 0 0 0 2 1453
## 2 2 5.5 1 1 0 0 0 2 1844
## 3 3 5.5 0 0 0 0 0 0 1545
## 4 4 5.5 0 0 0 0 0 0 1723
## 5 1 8 1 1 0 0 0 2 1645
## 6 2 8 1 1 0 0 0 2 1817
## ImpedanceA E_Mucosa E_Submucosa E_CM E_LM N_Mucosa N_Submucosa N_CM N_LM
## 1 1453 9.7 1.0 0 0 14.0 0.7 0.3 0
## 2 1844 3.3 0.0 0 0 9.7 1.0 0.0 0
## 3 1545 6.7 0.0 0 0 7.7 2.0 0.0 0
## 4 1723 4.3 0.3 0 0 1.7 0.3 0.0 0
## 5 1645 6.7 0.0 0 0 9.3 0.0 0.0 0
## 6 1817 9.3 0.0 0 0 11.3 0.0 0.0 0
## T_Mucosa T_Submucosa T_CM T_LM
## 1 17.7 6.7 1.3 1
## 2 15.7 0.3 0.0 0
## 3 18.3 0.0 0.0 0
## 4 23.0 1.0 0.0 0
## 5 15.7 0.3 0.0 0
## 6 23.0 1.0 0.0 0
Create the graph with bar plots of impedance and SE as error bar. They grey and black bars means that the tissue comes from rats untreated.
> get.se <- function(y) {
+ se <- sd(y) / sqrt(length(y)) #The error bar refers to SE
+ mu <- mean(y)
+ c(ymin=mu-se, ymax=mu+se)
+ }
> g1 <- ggplot(d, aes(x=TissueType, y=ImpedanceB)) + stat_summary(fun.y=mean, geom="bar", fill=c("Normal5.5"="grey", "Normal8"="black", "Prior5.5"="grey", "Prior8"="black"), color="black", width=0.5) + stat_summary(fun.data=get.se, geom="errorbar", width=0.25) + ylim(0, 2000) + ylab("impedance(Ω)") + scale_x_discrete(labels=c("Normal5.5", "Normal8", "Prior5.5", "Prior8"))
> d2 <- d[c(9:16), ] #subset only the data of rats receiving injection
> g2 <- ggplot(d2, aes(x=TissueType, y=ImpedanceA)) + stat_summary(fun.y=mean, geom="bar", fill=c("Post5.5"="pink", "Post8"="brown1"), color="black", width=0.25) + stat_summary(fun.data=get.se, geom="errorbar", width=0.125) + ylim(0, 2000) + ylab("impedance(Ω)") + scale_x_discrete(labels=c( "Post5.5", "Post8"))
> Figure1 <- ggarrange(g1, g2) #Arrange the graph for better comparison
> Figure1
Do the two-way ANOVA test. A p-value of p<0.05 is considered as statistically significant here.
> two.way1 <- aov(ImpedanceB - ImpedanceA ~ TissueType, data=d2)
> summary(two.way1)
## Df Sum Sq Mean Sq F value Pr(>F)
## TissueType 1 167910 167910 7.694 0.0323 *
## Residuals 6 130935 21822
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> one.way1 <- aov(ImpedanceA ~ TissueType, data=d2)
> summary(one.way1)
## Df Sum Sq Mean Sq F value Pr(>F)
## TissueType 1 232903 232903 48.69 0.000431 ***
## Residuals 6 28701 4783
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Both of the p-values are smaller than 0.05. Therefore, it is verified that the impedance measurements taken within the inflammatory tissues decreased, and impedance measurements taken from the inflammatory epicenter at 90 min were significantly smaller than those taken at the same time within the penumbra.
Create the graph with bar plots of histological Score and SE as error bar, and another graph with trend line and scatterplot.
> g3 <- ggplot(d, aes(x=TissueType, y=TotalScore)) + scale_x_discrete(labels=c("Normal5.5", "Normal8", "Inflamed5.5", "Inflamed8")) + stat_summary(fun.y=mean, geom="bar", fill=c("Normal5.5"="grey", "Normal8"="black", "Prior5.5"="pink", "Prior8"="brown1"), color="black", width=0.6) + stat_summary(fun.data=get.se, geom="errorbar", width=0.3) + ylim(0, 15) + ylab("histological score (0-15)")
> g4 <- ggplot(d, aes(x=ImpedanceA, y=TotalScore)) + geom_smooth(method="lm", se=FALSE, color="black") + geom_point(aes(colour=factor(TissueType), shape=factor(TissueType)), stat="identity", show.legend=TRUE) + theme(legend.position=c(0.8, 0.7), legend.title=element_blank()) + ylim(0,15) + xlim(500, 2000) + ylab("histological score (0-15)") + xlab("impedance(Ω)")
> g4 <- g4 + scale_shape_discrete(labels=c("5.5"="5.5 cm", "8"="8 cm", "A"="penumbra", "L"="epicentre")) + scale_colour_discrete(labels=c("5.5"="5.5 cm", "8"="8 cm", "A"="penumbra", "L"="epicentre"))
> Figure2 <- ggarrange(g3, g4) #Arrange the graph for better comparison
## `geom_smooth()` using formula = 'y ~ x'
> Figure2
Do the statistical tests related to the first figure now.
> d3 <- d[c(1:4, 10, 12, 14, 16), ]
> d4 <- d[c(5:8, 9, 11, 13, 15), ]
> one.way2 <- aov(TotalScore ~ TissueType, data=d3)
> summary(one.way2) #Histological damage difference between inflammatory penumbra (5.5cm) and normal 5.5 cm tissue.
## Df Sum Sq Mean Sq F value Pr(>F)
## TissueType 1 24.5 24.500 21 0.00376 **
## Residuals 6 7.0 1.167
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> one.way3 <- aov(TotalScore ~ TissueType, data=d4)
> summary(one.way3) #Histological damage difference between inflammatory epicentre (8cm) and normal 8 cm tissue.
## Df Sum Sq Mean Sq F value Pr(>F)
## TissueType 1 136.13 136.13 93.34 7.05e-05 ***
## Residuals 6 8.75 1.46
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Calculate R-squared value and p-value of the correlation now.
> limod1 <- lm(TotalScore ~ ImpedanceA, data=d)
> summary(limod1)
##
## Call:
## lm(formula = TotalScore ~ ImpedanceA, data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3530 -1.0415 0.1986 0.9834 2.9309
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.210877 2.105192 8.650 5.45e-07 ***
## ImpedanceA -0.009992 0.001440 -6.939 6.89e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.789 on 14 degrees of freedom
## Multiple R-squared: 0.7747, Adjusted R-squared: 0.7586
## F-statistic: 48.14 on 1 and 14 DF, p-value: 6.888e-06
Both the difference in histological damage between inflammatory tissue and normal tissue and the correlation between histological score and impedance are verified as significant. Although the R-squared value indicates that the histological damage and impedance are not perfectly correlated, accordingly, they are still strongly correlated.
Create the graph with bar plots of CD3+ cells count and SE as error bar, and another graph with trend line and scatterplot.
> g5 <- ggplot(d, aes(x=TissueType, y=T_Mucosa)) + scale_x_discrete(labels=c("Normal5.5", "Normal8", "Inflamed5.5", "Inflamed8")) + stat_summary(fun.y=mean, geom="bar", fill=c("Normal5.5"="grey", "Normal8"="black", "Prior5.5"="pink", "Prior8"="brown1"), color="black", width=0.6) + stat_summary(fun.data=get.se, geom="errorbar", width=0.3) + ylim(0, 40) + ylab("CD3+ cells (mm-1)")
> g6 <- ggplot(d, aes(x=ImpedanceA, y=T_Mucosa)) + geom_smooth(method="lm", se=FALSE, color="black") + geom_point(aes(colour=factor(TissueType), shape=factor(TissueType)), stat="identity", show.legend=TRUE) + theme(legend.position=c(0.3, 0.3), legend.title=element_blank()) + ylim(0,40) + xlim(0, 2000) + ylab("CD3+ cells (mm-1)") + xlab("impedance(Ω)")
> g6 <- g6 + scale_shape_discrete(labels=c("5.5"="5.5 cm", "8"="8 cm", "A"="penumbra", "L"="epicentre")) + scale_colour_discrete(labels=c("5.5"="5.5 cm", "8"="8 cm", "A"="penumbra", "L"="epicentre"))
> Figure3 <- ggarrange(g5, g6) #Arrange the graph for better comparison
## `geom_smooth()` using formula = 'y ~ x'
> Figure3
Do the statistical tests related to the first figure now.
> one.way4 <- aov(T_Mucosa ~ TissueType, data=d3)
> summary(one.way4) #CD3+ cell count difference between inflammatory penumbra (5.5cm) and normal 5.5 cm tissue.
## Df Sum Sq Mean Sq F value Pr(>F)
## TissueType 1 116.28 116.28 13.09 0.0111 *
## Residuals 6 53.31 8.88
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> one.way5 <- aov(T_Mucosa ~ TissueType, data=d4)
> summary(one.way5) #CD3+ cell count difference between inflammatory epicentre (8cm) and normal 8 cm tissue.
## Df Sum Sq Mean Sq F value Pr(>F)
## TissueType 1 435.1 435.1 31.88 0.00132 **
## Residuals 6 81.9 13.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> one.way6 <- aov(T_Mucosa ~ TissueType, data=d2)
> summary(one.way6) #Difference between CD3+ Cells taken from different inflammatory site (penumbra and epicentre)
## Df Sum Sq Mean Sq F value Pr(>F)
## TissueType 1 120.90 120.90 15.14 0.00807 **
## Residuals 6 47.91 7.98
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Calculate R-squared value and p-value of the correlation now.
> limod2 <- lm(T_Mucosa ~ ImpedanceA, data=d)
> summary(limod2)
##
## Call:
## lm(formula = T_Mucosa ~ ImpedanceA, data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.309 -4.422 1.219 2.974 7.671
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 48.643528 5.625591 8.647 5.48e-07 ***
## ImpedanceA -0.016836 0.003848 -4.375 0.000635 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.781 on 14 degrees of freedom
## Multiple R-squared: 0.5776, Adjusted R-squared: 0.5474
## F-statistic: 19.14 on 1 and 14 DF, p-value: 0.0006347
Both the difference in CD3+ cells number between inflammatory tissue and normal tissue and the correlation between CD3+ cells number and impedance are verified as significant. Although the R-squared value indicates that the histological damage and impedance are not perfectly correlated, accordingly, they are still moderately correlated.
Create the graph with bar plots of eosinophils and SE as error bar, and another graph with trend line and scatterplot.
> g7 <- ggplot(d, aes(x=TissueType, y=E_Mucosa)) + scale_x_discrete(labels=c("Normal5.5", "Normal8", "Inflamed5.5", "Inflamed8")) + stat_summary(fun.y=mean, geom="bar", fill=c("Normal5.5"="grey", "Normal8"="black", "Prior5.5"="pink", "Prior8"="brown1"), color="black", width=0.6) + stat_summary(fun.data=get.se, geom="errorbar", width=0.3) + ylim(0, 25) + ylab("eosinophils (mm-1)")
> g8 <- ggplot(d, aes(x=ImpedanceA, y=E_Mucosa)) + geom_smooth(method="lm", se=FALSE, color="black") + geom_point(aes(colour=factor(TissueType), shape=factor(TissueType)), stat="identity", show.legend=TRUE) + theme(legend.position=c(0.3, 0.3), legend.title=element_blank()) + ylim(0,25) + xlim(0, 2000) + ylab("eosinophils (mm-1)") + xlab("impedance(Ω)")
> g8 <- g8 + scale_shape_discrete(labels=c("5.5"="5.5 cm", "8"="8 cm", "A"="penumbra", "L"="epicentre")) + scale_colour_discrete(labels=c("5.5"="5.5 cm", "8"="8 cm", "A"="penumbra", "L"="epicentre"))
> Figure4 <- ggarrange(g7, g8) #Arrange the graph for better comparison
## `geom_smooth()` using formula = 'y ~ x'
> Figure4
Do the statistical tests related to the first figure now.
> one.way7 <- aov(E_Mucosa ~ TissueType, data=d3)
> summary(one.way7) #Eosinophils difference between inflammatory penumbra (5.5cm) and normal 5.5 cm tissue.
## Df Sum Sq Mean Sq F value Pr(>F)
## TissueType 1 15.12 15.125 3.231 0.122
## Residuals 6 28.09 4.682
> one.way8 <- aov(E_Mucosa ~ TissueType, data=d4)
> summary(one.way8) #Eosinophils damage difference between inflammatory epicentre (8cm) and normal 8 cm tissue.
## Df Sum Sq Mean Sq F value Pr(>F)
## TissueType 1 288.0 288.00 23.01 0.00301 **
## Residuals 6 75.1 12.52
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> one.way9 <- aov(E_Mucosa ~ TissueType, data=d2)
> summary(one.way9) #Difference between eosinophils taken from different imflammatory site (penumbra and epicentre)
## Df Sum Sq Mean Sq F value Pr(>F)
## TissueType 1 187.21 187.21 22.8 0.00308 **
## Residuals 6 49.28 8.21
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Calculate R-squared value and p-value of the correlation now.
> limod3 <- lm(E_Mucosa ~ ImpedanceA, data=d)
> summary(limod3)
##
## Call:
## lm(formula = E_Mucosa ~ ImpedanceA, data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.5473 -1.6331 -0.2978 0.8212 5.6674
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 32.945149 3.246155 10.149 7.78e-08 ***
## ImpedanceA -0.016132 0.002221 -7.265 4.13e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.759 on 14 degrees of freedom
## Multiple R-squared: 0.7904, Adjusted R-squared: 0.7754
## F-statistic: 52.78 on 1 and 14 DF, p-value: 4.126e-06
Both the difference in eosinophils between inflammatory epicentre and normal epicentre, and the correlation between eosinophils and impedance are verified as significant. Although the R-squared value indicates that the histological damage and impedance are not perfectly correlated, accordingly, they are still strongly correlated.
Create the graph with bar plots of neutrophils and SE as error bar, and another graph with trend line and scatterplot.
> g9 <- ggplot(d, aes(x=TissueType, y=N_Mucosa)) + scale_x_discrete(labels=c("Normal5.5", "Normal8", "Inflamed5.5", "Inflamed8")) + stat_summary(fun.y=mean, geom="bar", fill=c("Normal5.5"="grey", "Normal8"="black", "Prior5.5"="pink", "Prior8"="brown1"), color="black", width=0.6) + stat_summary(fun.data=get.se, geom="errorbar", width=0.3) + ylim(0, 40) + ylab("neutrophils (mm-1)")
> g10 <- ggplot(d, aes(x=ImpedanceA, y=N_Mucosa)) + geom_smooth(method="lm", se=FALSE, color="black") + geom_point(aes(colour=factor(TissueType), shape=factor(TissueType)), stat="identity", show.legend=TRUE) + theme(legend.position=c(0.3, 0.3), legend.title=element_blank()) + ylim(0,40) + xlim(0, 2000) + ylab("neutrophils (mm-1)") + xlab("impedance(Ω)")
> g10 <- g10 + scale_shape_discrete(labels=c("5.5"="5.5 cm", "8"="8 cm", "A"="penumbra", "L"="epicentre")) + scale_colour_discrete(labels=c("5.5"="5.5 cm", "8"="8 cm", "A"="penumbra", "L"="epicentre"))
> Figure5 <- ggarrange(g9, g10) #Arrange the graph for better comparison
## `geom_smooth()` using formula = 'y ~ x'
> Figure5
Do the statistical tests related to the first figure now.
> one.way10 <- aov(N_Mucosa ~ TissueType, data=d3)
> summary(one.way10) #Neutrophils difference between inflammatory penumbra (5.5cm) and normal 5.5 cm tissue.
## Df Sum Sq Mean Sq F value Pr(>F)
## TissueType 1 533.0 533.0 16.34 0.00678 **
## Residuals 6 195.7 32.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> one.way11 <- aov(N_Mucosa ~ TissueType, data=d4)
> summary(one.way11) #Neutrophils difference between inflammatory epicentre (8cm) and normal 8 cm tissue.
## Df Sum Sq Mean Sq F value Pr(>F)
## TissueType 1 993.2 993.2 51.46 0.000371 ***
## Residuals 6 115.8 19.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Calculate R-squared value and p-value of the correlation now.
> limod4 <- lm(N_Mucosa ~ ImpedanceA, data=d)
> summary(limod4)
##
## Call:
## lm(formula = N_Mucosa ~ ImpedanceA, data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.3636 -4.1238 -0.3756 3.5818 11.8303
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 63.531449 6.842983 9.284 2.33e-07 ***
## ImpedanceA -0.031032 0.004681 -6.629 1.13e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.816 on 14 degrees of freedom
## Multiple R-squared: 0.7584, Adjusted R-squared: 0.7412
## F-statistic: 43.95 on 1 and 14 DF, p-value: 1.134e-05
The difference in neutrophils between inflammatory epicentre and normal epicentre, and the correlation between neutrophils and impedance are verified as significant. Although the R-squared value indicates that the histological damage and impedance are not perfectly correlated, accordingly, they are still strongly correlated.
After the TNBS injection, numbers of CD3+ cells increased (p < 0.05) in the mucosa of the tissue taken form the inflammatory penumbra (5.5 cm location), comparing with the number of CD3+ cells in normal 5.5 cm tissue. The same thing also happens (p < 0.05) in the epicentre (8 cm location), comparing with normal 8 cm tissue. Additionally, it was found that there were more CD3+ cells (p < 0.05) in tissue taken from the inflammatory epicentre than the inflammatory penumbra. There was a significant correlation between numbers of CD3+ cells and impedance values. (R-squared = 0.57, p=0.0007).
After the TNBS injection, numbers of eosinophils increased (p < 0.05) in the mucosa of the tissue taken form the inflammatory epicentre (8 cm location), comparing with the number of CD3+ cells in normal 8 cm tissue. The same thing does not happen (p > 0.05) in the penumbra (5,5 cm location), comparing with normal 5.5 cm tissue. Additionally, it was found that there were more eosinophils (p < 0.05) in tissue taken from the inflammatory epicentre than the inflammatory penumbra. There was a significant correlation between numbers of eosinophils and impedance values. (R-squared = 0.79, p < 0.0001).
After the TNBS injection, numbers of neutrophils increased (p < 0.05) in the mucosa of the tissue taken form the inflammatory penumbra (5.5 cm location), comparing with the number of neutrophils in normal 5.5 cm tissue. The same thing also happens (p < 0.05) in the epicentre (8 cm location), comparing with normal 8 cm tissue. There was a significant correlation between numbers of CD3+ cells and impedance values. (R-squared = 0.76, p < 0.0001).
It was showed that transmural impedance was accurate in predicting the severity of inflammation as ditermined by histological score and leucocyte infiltration (including CD3+ cells, eosinophils, and neutrophils) into mucosal tissue. Therefore, it is verified that transmural impedance can be used as a real-time, region specific indicator of mucosal integrity, and can refer to the severities of intestinal inflammation of different regions within the same individual.
Link to original dataset: https://doi.org/10.5061/dryad.79cnp5hrb
The csv file used in this replication assignment is made manually by integrating the data in several separate files in the original data set into one single file. All necessary data is recorded into the csv file.